import React, { Component } from "react";
import moment from "moment";
import Empty from "./../common/Empty";
import styles from "./Activity.module.scss";
import SubAd from './SubAd'
import { withRouter } from "react-router-dom";

class Activity extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }


  render() {
    const { datas } = this.props;
    if (datas.length === 0) {
      return <Empty title={"暂无数据"} />;
    }

    return (
      <div className={styles.activity_container}>
        {datas.map((item, index) => {
          return (
            <div>
              <SubAd datas={item}></SubAd>
            </div>
          );
        })}
      </div>
    );
  }
}

export default withRouter(Activity);
